package com.lu.service.live;

import com.lu.entity.Live;
import com.lu.mapper.LiveMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class LiveService implements LiveServices{

    @Autowired
    private LiveMapper liveMapper;

    //查询所有入住信息
    @Override
    public List<Live> getLiveData() {
        return liveMapper.selectAllLive();
    }

    //根据id删除入住数据
    @Override
    public void deleteLive(Integer id) {
        liveMapper.deleteLiveById(id);
    }

    //根据id删除入住数据
    @Override
    public List<Live> getLiveDataById(Integer id) {
        return liveMapper.findLiveById(id);
    }
    //修改入住数据
    @Override
    public void updataLiveData(Live live) {
        liveMapper.updateLiveData(live);
    }

    //添加学生数据
    @Override
    public void insertLiveData(Live live) {
        liveMapper.insertLiveData(live);
    }

    //入住模糊查询
    @Override
    public List<Live> getfindLive(Live live) {
        return liveMapper.findLive(live);
    }
}
